#!/bin/bash -e

function info() {
echo Usage: `basename $0` '[-m -n nums] manifest or uuid'
exit 2
}

while getopts  ":p:f:mn:" opt; do
	case  $opt  in
		p) out_prefix=$OPTARG;;
		f) suffix=$OPTARG;;
        n) num=$OPTARG;;
        m) manifest=-m;;
		*) info;;
	esac
done
shift $(($OPTIND - 1))


if [ $# -lt 1 ]; then info; fi

. $var

# -v \
# --log-file $sava_path/.log \
# --no-related-files \
# --no-annotations \


sava_path=/mnt/ilustre/app/medical/.data/gdc/methylation/450/beta

gdc-client download \
-v \
--no-segment-md5sums \
-d $sava_path \
-n ${num:=2} \
$manifest $@

. $cmd_done